package wh.coach.utils;

import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeUnit;

/**
 * @author xhw
 * @date 2023/12/13
 */

public interface ObjectStore<V> {
    ObjectWrapper<V> getObject(String key);

    List<ObjectWrapper<V>> getObjects(Collection<String> keys);

    void remove(String key);

    void setNotExists(String key);

    void setNotExists(String key, long timeout, TimeUnit unit);

    void setObject(String key, V object);

    void setObject(String key, V object, long timeout, TimeUnit unit);

    void setObjects(Collection<String> keys, Collection<V> objects);

    void setObjects(Collection<String> keys, Collection<V> objects, long timeout, TimeUnit unit);
}
